package user;

import book.BookList;
import operation.IOperation;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86131
 * Date: 2024-02-20
 * Time: 15:54
 */
public abstract class User {  //抽象类
    protected String name;
    protected IOperation[] iOperations;

    public User(String name) {
        this.name = name;
    }
    public abstract int menu();  //抽象方法,没有具体实现,子类需重写

    public void doOperation(int choice, BookList bookList) {
        this.iOperations[choice].work(bookList);
    }
}
